package net.zjitc.dao;


import net.zjitc.domain.Order;
import net.zjitc.domain.OrderItem;
import net.zjitc.domain.User;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * Created by guo on 2017/11/22.
 */
public interface OrdersDao {
    List<Order> findAllOrders() throws SQLException;

    List<Order> findOrders(int state);

    int add(Order order);

//    List<Order> findAllOrdersByOid(String oid);

    List<Map<String, Object>> findAllOrdersByUser(User user);


    List<OrderItem> findOrderitemByOid(String oid);

//    List<Order> findByUid(int uid);

    int findOrderByItemid(int itemid);

    List<Order> findByUid(int uid);
}
